add_library( mesh "" )

target_sources( mesh PRIVATE
	boundaryPatch.cpp
	boundaryPatch.hpp
	boundaryPatch.tpp
	cellBase.cpp
	cellBase.hpp
	cell.cpp
	cell.hpp
	cellsBase.hpp
	cellsBase.tpp
	cells.cpp
	cells.hpp
	edgeBase.cpp
	edgeBase.hpp
	edge.cpp
	edge.hpp
	edgesBase.hpp
	edgesBase.tpp
	edges.cpp
	edges.hpp
	geometry.cpp
	geometry.hpp
	geometry.tpp
	meshBase.cpp
	meshBase.hpp
	meshBase.tpp
	mesh.hpp
	mesh.cpp
	meshForEachCell.hpp
	meshFunctions.cpp
	meshFunctions.hpp
	meshGen.hpp
	meshGen.cpp
	meshImportExport.cpp
	meshImportExport.hpp
	meshInstantiator.hpp
	meshTypeFunctions.cpp
	meshTypeFunctions.hpp
	meshTypeFunctions.tpp
	meshTypes.hpp
	rectCell.cpp
	rectCell.hpp
	rectCells.hpp
	rectCells.cpp
	rectEdge.cpp
	rectEdge.hpp
	rectEdges.cpp
	rectEdges.hpp
	rectMesh.cpp
	rectMeshFunctions.cpp
	rectMeshFunctions.hpp
	rectMesh.hpp
	structCellBase.cpp
	structCellBase.hpp
	structCell.cpp
	structCell.hpp
	structCellsBase.hpp
	structCells.cpp
	structCells.hpp
	structEdgeBase.cpp
	structEdgeBase.hpp
	structEdge.cpp
	structEdge.hpp
	structEdgesBase.hpp
	structEdgesBase.cpp
	structEdges.cpp
	structEdges.hpp
	structMeshBase.cpp
	structMeshBase.hpp
	structMesh.cpp
	structMeshFunctions.cpp
	structMeshFunctions.hpp
	structMeshFunctions.tpp
	structMesh.hpp
	structMeshInstantiator.hpp
	topology.cpp
	topology.hpp
	topology.tpp
	uniCell.cpp
	uniCell.hpp
	uniCells.cpp
	uniCells.hpp
	uniEdge.cpp
	uniEdge.hpp
	uniEdges.cpp
	uniEdges.hpp
	uniMesh.cpp
	uniMesh.hpp
)

# populating the PUBLIC_INCLUDE_DIRECTORIES property of the target means that 
# this target as well as every target linked against this one will use these 
# include_dirs.
target_include_directories( mesh PUBLIC
	${CMAKE_CURRENT_SOURCE_DIR}
)

target_link_libraries( mesh PUBLIC
	util
	io_utils
)

target_compile_definitions( mesh PUBLIC
	STRUCTMESH_PRECALC_EDGE_PARENT_CELLS
	# UNIMESH_PRECALC_CELL_CONSTANTS
	# UNIMESH_PRECALC_CENTROIDS
	# RECTMESH_PRECALC_AREAS
	# RECTMESH_PRECALC_CIRCUMFS
	# RECTMESH_PRECALC_CENTROIDS
)